using System;
using System.Collections.Generic;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Random = UnityEngine.Random;

[CreateAssetMenu(fileName = "ResultConfig", menuName = "山中战纪/结算配置")]
public class ResultConfig : ScriptableObject
{
    [Header("基础奖励")]
    public int baseGoldReward = 25;
    public int baseCreditReward = 1;

    [Header("学分要求")]
    public int creditRequirementForBoss = 10;

    [Header("可用遗物池")]
    public List<string> commonRelics;
    public List<string> rareRelics;
    public List<string> bossRelics;

    public List<string> GetRandomRelicRewards(int count)
    {
        List<string> rewards = new List<string>();
        List<string> pool = new List<string>(commonRelics);

        // 随机选择遗物
        for (int i = 0; i < count && pool.Count > 0; i++)
        {
            int randomIndex = Random.Range(0, pool.Count);
            rewards.Add(pool[randomIndex]);
            pool.RemoveAt(randomIndex);
        }

        return rewards;
    }
}